package groovyx

import groovy.servlet.ServletBinding
import groovyx.gaelyk.GaelykServlet

/**
 * gaelyk servlet with Spring support
 *
 * @author linux_china
 */
class GaelykWithSpringServlet extends GaelykServlet {

  /**
   * set binding with spring beans
   */
  protected void setVariables(ServletBinding binding) {
    super.setVariables(binding);
    SpringContextLoaderListener.BEANS.each {key, value -> binding.setVariable(key, value)}
  }

}